Check AI spend allowance
Ask whether a customer may spend right now. A read only — it reserves nothing. A customer with no billing policy is answered with allowed: false, reason: "not_configured" rather than an error, so an agent always gets a verdict it can act on.
Authorizations
Body
Check payload.
The agent making the call, as run({ agent }) names it. Optional, and absent means the customer's shared pool — which is what every call did before per-agent billing existed. Naming an agent only changes anything once an operator has given that agent a billing policy of its own; until then it resolves to the same shared pool and the response says so with agent: null.
1 - 128"invoice-copilot"
Response
Verdict.
Reason spending was denied. Null when allowed.
- not_configured: No billing policy is configured.
- unsupported_mode: The billing configuration is unsupported.
- customer_not_found: The customer could not be found.
- wallet_missing: The monetary wallet is unavailable.
- credit_pot_missing: The credit balance is unavailable.
- blocked: Spending is disabled for the scope.
- insufficient_balance: The wallet balance is at or below the policy floor.
- insufficient_credits: The credit balance cannot cover the required spend.
- allowance_exhausted: A rolling allowance has no room for the spend.
- windows_not_configured: Rolling allowance definitions are missing.
not_configured, unsupported_mode, customer_not_found, wallet_missing, credit_pot_missing, blocked, insufficient_balance, insufficient_credits, allowance_exhausted, windows_not_configured null
What the customer can spend. In wallet mode this is the shadow balance — micro-consumption never touches the wallet ledger directly. In credits mode it is the credit pot itself, read live. In windows mode the three numbers describe the binding window, the one with least room left and therefore the one that will refuse the next call; meters carries every window separately.

